From a8a944c43dfd84f77a4314832b73486533ee5084 Mon Sep 17 00:00:00 2001 From: dgellow Date: Fri, 27 Jan 2017 21:44:48 +0100 Subject: [PATCH] directly print error only if there is more than one job in the queue --- src/cargo/ops/cargo_rustc/job_queue.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cargo/ops/cargo_rustc/job_queue.rs b/src/cargo/ops/cargo_rustc/job_queue.rs index e7a242c55..7a380851e 100644 --- a/src/cargo/ops/cargo_rustc/job_queue.rs +++ b/src/cargo/ops/cargo_rustc/job_queue.rs @@ -182,15 +182,15 @@ impl<'a> JobQueue<'a> { match result { Ok(()) => self.finish(key, cx)?, Err(e) => { - handle_error(&*e, &mut *cx.config.shell()); - if self.active > 0 { + error = Some(human("build failed")); + handle_error(&*e, &mut *cx.config.shell()); cx.config.shell().say( "Build failed, waiting for other \ jobs to finish...", YELLOW)?; } if error.is_none() { - error = Some(human("build failed")); + error = Some(e); } } } -- 2.30.2